﻿Imports TransportadoraToledoBLL
Imports TransportadoraToledoDAL
Imports System.Windows.Forms

Public Class frm_cadastro_funcionarios

#Region "Variáveis"
    Public objBLL As New FuncionariosBLL
    Public controle As String
    Public ultimo, primeiro, atual As Integer

#End Region

#Region "Métodos"

    Sub carregaPrimeiroUltimo()
        Try
            ultimo = objBLL.localizarPrimeiroUltimo("ultimo")
            primeiro = objBLL.localizarPrimeiroUltimo("primeiro")
            atual = ultimo
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try

    End Sub

    Sub carregaUltimo()
        Try
            If (ultimo <> 0) Then
                objBLL = New FuncionariosBLL
                objBLL.localizar(ultimo)
                If (objBLL.pCodigo <> 0) Then
                    carregaCampos()
                End If
                objBLL = Nothing
            End If
        Catch ex As Exception

        End Try

    End Sub

    Sub carregaPrimeiro()
        If (primeiro <> 0) Then
            objBLL = New FuncionariosBLL
            objBLL.localizar(primeiro)
            If (objBLL.pCodigo <> 0) Then
                carregaCampos()

            End If
            objBLL = Nothing
        End If
    End Sub

    Sub limpar()
        txtCodigo.Text = ""
        txtNome.Text = ""
        txtBairro.Text = ""
        txtNumero.Text = ""
        txtSalario.Text = ""
        cbCidade.SelectedValue = 5115
        txtCEP.Text = ""
        txtCH.Text = ""
        cbCargo.SelectedIndex = -1
        txtComplemento.Text = ""
        txtLogradouro.Text = ""
        controle = ""
        txtCnh.Text = ""
        txtFixo.Text = ""
        txtCelular.Text = ""
        txtRecado.Text = ""
        dtAdmissao.Value = Date.Now
        If (objBLL IsNot Nothing) Then
            objBLL.limpar()
        End If

    End Sub

    Sub status(ByVal sta As Boolean)

        If (txtCodigo.Text = "" Or controle = "A") Then
            bIncluir.Enabled = sta

            bExcluir.Enabled = sta
            If (txtCodigo.Text = "") Then
                bAlterar.Enabled = False
                bVaPara.Enabled = False
                bPesquisar.Enabled = False
                bExcluir.Enabled = False
            Else
                bExcluir.Enabled = sta
                bPesquisar.Enabled = sta
                bAlterar.Enabled = sta
                bVaPara.Enabled = sta
            End If
            bCancelar.Enabled = Not sta
            bSalvar.Enabled = Not sta
            bPrimeiro.Enabled = sta
            bProximo.Enabled = sta
            bUltimo.Enabled = sta
            bAnterior.Enabled = sta
            gbConteudo.Enabled = Not sta
        Else
            bIncluir.Enabled = sta

            If (txtCodigo.Text = "") Then
                bExcluir.Enabled = False
                bAlterar.Enabled = False
                bVaPara.Enabled = False
                bPesquisar.Enabled = False
            Else
                bExcluir.Enabled = sta
                bAlterar.Enabled = sta
                bVaPara.Enabled = sta
                bPesquisar.Enabled = sta
            End If

            bCancelar.Enabled = Not sta
            bSalvar.Enabled = Not sta

            gbConteudo.Enabled = Not sta
        End If

        If (atual = primeiro And atual = ultimo) Then
            bProximo.Enabled = False
            bUltimo.Enabled = False
            bAnterior.Enabled = False
            bPrimeiro.Enabled = False
        ElseIf (atual = ultimo) Then
            bProximo.Enabled = False
            bUltimo.Enabled = False
            bAnterior.Enabled = True
            bPrimeiro.Enabled = True
        ElseIf (atual = primeiro) Then
            bProximo.Enabled = True
            bUltimo.Enabled = True
            bAnterior.Enabled = False
            bPrimeiro.Enabled = False
        Else
            bProximo.Enabled = True
            bUltimo.Enabled = True
            bAnterior.Enabled = True
            bPrimeiro.Enabled = True

        End If
    End Sub

    Sub carregaPropriedades()

        Try
            objBLL = New FuncionariosBLL
            If (txtCodigo.Text = "") Then
                objBLL.pfun_codigo = 0
            Else
                objBLL.pfun_codigo = txtCodigo.Text
            End If
            objBLL.pnome = txtNome.Text
            objBLL.plogradouro = txtLogradouro.Text
            objBLL.pcomplemento = txtComplemento.Text
            objBLL.pnumero = txtNumero.Text
            objBLL.pbairro = txtBairro.Text
            objBLL.pcod_cidade = cbCidade.SelectedValue
            If txtCEP.Text.Length > 0 And txtCEP.Text.Length < 8 Then
                Throw New Exception("Digite um CEP Válido!")
            Else
                objBLL.pcep = txtCEP.Text
            End If
            objBLL.pda_admissao = dtAdmissao.Value
            If IsNumeric(txtSalario.Text) Then
                objBLL.psalario = txtSalario.Text
            Else
                objBLL.psalario = 0
            End If
            If IsNumeric(txtCH.Text) Then
                objBLL.pch_semanal = txtCH.Text
            Else
                objBLL.pch_semanal = 0
            End If
            objBLL.pcargo = cbCargo.SelectedValue
            objBLL.ptipo = "F"
            If txtCnh.Visible = True Then
                objBLL.pcnh = txtCnh.Text
            Else
                objBLL.pcnh = ""
            End If
            If txtFixo.Text.Length > 0 And txtFixo.Text.Length < 8 Then
                Throw New Exception("Digite um Telefone Fixo Válido!")
            Else
                objBLL.ptelefone_fixo = txtFixo.Text
            End If
            If txtCelular.Text.Length > 0 And txtCelular.Text.Length < 8 Then
                Throw New Exception("Digite um Telefone Celular Válido!")
            Else
                objBLL.pcelular = txtCelular.Text
            End If
            If txtRecado.Text.Length > 0 And txtRecado.Text.Length < 8 Then
                Throw New Exception("Digite um Telefone de Recado Válido!")
            Else
                objBLL.ptelefone_recado = txtRecado.Text
            End If
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Sub carregaCampos()
        Try
            txtCodigo.Text = objBLL.pfun_codigo
            txtNome.Text = objBLL.pnome
            txtNumero.Text = objBLL.pnumero
            txtBairro.Text = objBLL.pbairro
            txtLogradouro.Text = objBLL.plogradouro
            txtComplemento.Text = objBLL.pcomplemento
            cbCidade.SelectedValue = objBLL.pcod_cidade
            txtCEP.Text = objBLL.pcep
            dtAdmissao.Value = objBLL.pda_admissao
            txtSalario.Text = objBLL.psalario
            txtCH.Text = objBLL.pch_semanal
            cbCargo.SelectedValue = objBLL.pcargo
            If objBLL.pcargo = 1 Or objBLL.pcargoDesc = "Motorista" Then
                txtCnh.Visible = True
                lblCnh.Visible = True
                txtCnh.Text = objBLL.pcnh
            Else
                txtCnh.Visible = False
                lblCnh.Visible = False
                txtCnh.Text = ""
            End If
            txtFixo.Text = objBLL.ptelefone_fixo
            txtCelular.Text = objBLL.pcelular
            txtRecado.Text = objBLL.ptelefone_recado
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Sub atualizaGrid(ByVal tab As DataTable)
        Try
            dgDados.DataSource = tab
            dgDados.Columns(0).HeaderText = "Código"
            dgDados.Columns(1).HeaderText = "Nome"
            dgDados.Columns(2).HeaderText = "Logradouro"
            dgDados.Columns(3).HeaderText = "Complemento"
            dgDados.Columns(4).HeaderText = "Numero"
            dgDados.Columns(5).HeaderText = "Bairro"
            dgDados.Columns(6).HeaderText = "Cidade"
            dgDados.Columns(7).HeaderText = "CEP"
            dgDados.Columns(8).HeaderText = "Telefone Fixo"
            dgDados.Columns(9).HeaderText = "Celular"
            dgDados.Columns(10).HeaderText = "Telefone de Recado"
            dgDados.Columns(12).HeaderText = "Cargo"
            dgDados.Columns(13).HeaderText = "Data de Admissão"
            dgDados.Columns(14).HeaderText = "Salário"
            dgDados.Columns(15).HeaderText = "Carga Horária Semanal"
            dgDados.Columns(16).HeaderText = "Ativo"
            dgDados.Columns(0).Width = 50
            dgDados.Columns(1).Width = 300
            dgDados.Columns(2).Width = 300
            dgDados.Columns(3).Width = 200
            dgDados.Columns(4).Width = 100
            dgDados.Columns(5).Width = 150
            dgDados.Columns(6).Width = 150
            dgDados.Columns(7).Width = 100
            dgDados.Columns(8).Width = 120
            dgDados.Columns(9).Width = 120
            dgDados.Columns(10).Width = 180
            dgDados.Columns(12).Width = 150
            dgDados.Columns(13).Width = 150
            dgDados.Columns(14).Width = 100
            dgDados.Columns(15).Width = 180
            dgDados.Columns(16).Width = 50
            dgDados.AllowUserToAddRows = False
            dgDados.Columns(11).Visible = False
            dgDados.Columns(17).Visible = False
            dgDados.Columns(18).Visible = False
            dgDados.Columns(14).DefaultCellStyle.Format = "R$ ###,###0.00"

        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

#End Region

    Private Sub frm_cadastro_funcionarios_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim objDAL As New Dados
        objDAL.preencheCombo(cbCidade, "cidade", "cod_cidade", "nom_cidade", "", "")
        objDAL.preencheCombo(cbCargo, "cargo_funcionario", "cf_codigo", "cf_descricao", "", "cf_descricao")
        cbCargo.SelectedIndex = 0
        carregaPrimeiroUltimo()
        carregaUltimo()
        cbBusca.SelectedIndex = 0
        objBLL = New FuncionariosBLL
        bCancelar_Click(sender, e)
    End Sub

    Private Sub cbCargo_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbCargo.SelectedIndexChanged
        If cbCargo.SelectedIndex <> -1 And cbCargo.SelectedIndex <> 0 Then
            If cbCargo.SelectedValue = 1 Then
                txtCnh.Visible = True
                lblCnh.Visible = True
            Else
                txtCnh.Visible = False
                lblCnh.Visible = False
                txtCnh.Text = ""
            End If
        Else
            txtCnh.Visible = False
            lblCnh.Visible = False
            txtCnh.Text = ""
        End If
    End Sub

#Region "Eventos Busca"

    Private Sub dgDados_CellDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgDados.CellDoubleClick
        Dim codigo As Integer
        If (e.RowIndex >= 0) Then
            codigo = dgDados.Rows(e.RowIndex).Cells("fun_codigo").Value
            objBLL.localizar(codigo)
            If (objBLL.pCodigo <> 0) Then
                carregaCampos()
                atual = objBLL.pCodigo
                gbConsulta.Visible = False
                bPesquisar.Enabled = True
                Me.Location = New System.Drawing.Point(Me.Location.X, Me.Location.Y + 127)
                Me.Size = New Size(720, 384)
            End If
        End If
    End Sub

    Private Sub bClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bClose.Click
        gbConsulta.Visible = False
        Me.Location = New System.Drawing.Point(Me.Location.X, Me.Location.Y + 127)
        Me.Size = New Size(720, 384)
        bPesquisar.Enabled = True
    End Sub

    Private Sub bFiltrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bFiltrar.Click
        Try
            objBLL = New FuncionariosBLL
            Dim tab As DataTable = objBLL.localizar(txtConsultar.Text, cbBusca.SelectedItem)
            If (tab.Rows.Count > 0) Then
                atualizaGrid(tab)
            Else
                MessageBox.Show("Registro(s) não encontrado(s)", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

#End Region

#Region "Eventos Menu"

    Private Sub bSair_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bSair.Click
        Me.Close()
    End Sub

    Private Sub bUltimo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bUltimo.Click
        carregaUltimo()
        atual = ultimo
        status(True)
    End Sub

    Private Sub bPrimeiro_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bPrimeiro.Click
        carregaPrimeiro()
        atual = primeiro
        status(True)
    End Sub

    Private Sub bIncluir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bIncluir.Click
        limpar()

        controle = "I"
        status(False)

    End Sub

    Private Sub bAnterior_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bAnterior.Click
        Try
            objBLL = New FuncionariosBLL
            Dim codigo = objBLL.localizarProxAnterior("anterior", atual)
            objBLL.localizar(codigo)
            If (objBLL.pfun_codigo <> 0) Then
                carregaCampos()
                atual = objBLL.pfun_codigo
            End If
            status(True)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        Finally
            objBLL = Nothing
        End Try
    End Sub


    Private Sub bProximo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bProximo.Click
        Try
            objBLL = New FuncionariosBLL
            Dim codigo = objBLL.localizarProxAnterior("proximo", atual)
            objBLL.localizar(codigo)
            If (objBLL.pfun_codigo <> 0) Then
                carregaCampos()
                atual = objBLL.pfun_codigo
            End If
            status(True)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        Finally
            objBLL = Nothing
        End Try
    End Sub

    Private Sub bCancelar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bCancelar.Click
        If (controle = "I") Then
            carregaPrimeiroUltimo()
            carregaUltimo()
        ElseIf (controle = "A") Then
            objBLL = New FuncionariosBLL
            objBLL.localizar(atual)
            If (objBLL.pCodigo <> 0) Then
                carregaCampos()
                atual = objBLL.pCodigo
            End If
        End If
        controle = ""

        status(True)
    End Sub

    Private Sub bAlterar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bAlterar.Click
        controle = "A"

        status(False)

    End Sub

    Private Sub bExcluir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bExcluir.Click
        Try
            If (MessageBox.Show("Deseja excluir?", "", MessageBoxButtons.YesNo) = DialogResult.Yes) Then
                carregaPropriedades()
                objBLL.excluir()
                MessageBox.Show("Excluido com sucesso!")
                limpar()
                carregaPrimeiroUltimo()
                carregaUltimo()
                status(True)
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub bVaPara_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bVaPara.Click
        Try
            Dim frm As New frm_VaPara("funcionarios")
            frm.ShowDialog()
            If (frm.codigo <> 0) Then
                'algum usuario foi clicado
                objBLL = New FuncionariosBLL
                objBLL.localizar(frm.codigo)
                If (objBLL.pfun_codigo <> 0) Then
                    carregaCampos()
                    atual = objBLL.pfun_codigo
                End If
            End If
            status(True)
            frm = Nothing
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        Finally
            objBLL = Nothing
        End Try
    End Sub

    Private Sub bSalvar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bSalvar.Click
        Try
            carregaPropriedades()
            If (controle = "I") Then
                objBLL.inserir()
                MessageBox.Show("Incluido com sucesso!")
                limpar()
                carregaPrimeiroUltimo()
                carregaUltimo()
                status(True)
            Else
                objBLL.alterar()
                MessageBox.Show("Alterado com sucesso!")

                status(True)
            End If

        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try

    End Sub

    Private Sub bPesquisar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bPesquisar.Click
        gbConsulta.Enabled = True
        gbConsulta.Visible = True
        bPesquisar.Enabled = False
        Me.Location = New System.Drawing.Point(Me.Location.X, Me.Location.Y - 127)
        Me.Size = New Size(720, 638)
    End Sub

#End Region

#Region "Eventos dos TextBox"

    Private Sub txtNome_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtNome.KeyPress
        Try
            If Char.IsNumber(e.KeyChar) And e.KeyChar <> Convert.ToChar(Keys.Back) Then
                e.Handled = True
            End If
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                txtLogradouro.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtLogradouro_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtLogradouro.KeyPress
        Try
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                txtBairro.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtBairro_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtBairro.KeyPress
        Try
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                txtComplemento.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtComplemento_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtComplemento.KeyPress
        Try
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                txtNumero.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtNumero_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtNumero.KeyPress
        Try
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                txtCEP.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtCEP_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCEP.KeyPress
        Try
            If Not Char.IsNumber(e.KeyChar) And e.KeyChar <> Convert.ToChar(Keys.Back) Then
                e.Handled = True
            End If
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                txtFixo.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtFixo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtFixo.KeyPress
        Try
            If Not Char.IsNumber(e.KeyChar) And e.KeyChar <> Convert.ToChar(Keys.Back) Then
                e.Handled = True
            End If
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                txtCelular.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtCelular_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCelular.KeyPress
        Try
            If Not Char.IsNumber(e.KeyChar) And e.KeyChar <> Convert.ToChar(Keys.Back) Then
                e.Handled = True
            End If
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                txtRecado.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtRecado_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtRecado.KeyPress
        Try
            If Not Char.IsNumber(e.KeyChar) And e.KeyChar <> Convert.ToChar(Keys.Back) Then
                e.Handled = True
            End If
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                txtCH.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtCH_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCH.KeyPress
        Try
            If Not Char.IsNumber(e.KeyChar) And e.KeyChar <> Convert.ToChar(Keys.Back) Then
                e.Handled = True
            End If
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                txtSalario.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtSalario_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSalario.KeyPress
        Try
            If Not Char.IsNumber(e.KeyChar) And e.KeyChar <> Convert.ToChar(Keys.Back) And e.KeyChar <> "," Then
                e.Handled = True
            End If
            If (e.KeyChar = Convert.ToChar(Keys.Enter)) Then
                dtAdmissao.Focus()
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtSalario_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSalario.Enter
        Try
            If (txtSalario.Text <> "") Then
                Dim valor As Double = txtSalario.Text.Replace("R$", "")
                txtSalario.Text = valor
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtSalario_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSalario.Leave
        Try
            If (txtSalario.Text <> "") Then
                Dim valor As Double = txtSalario.Text
                txtSalario.Text = valor.ToString("C2")
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub txtCnh_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCnh.KeyPress
        Try
            If Char.IsNumber(e.KeyChar) And e.KeyChar <> Convert.ToChar(Keys.Back) Then
                e.Handled = True
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

#End Region

    Private Sub bAjuda_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bAjuda.Click
        Try
            Dim Ajuda As String
            Ajuda = Application.StartupPath
            Ajuda = Ajuda.Replace("\bin\Debug", "\Arquivo de Ajuda\index.html#funcionarios")
            Dim Ie As Object
            Ie = CreateObject("InternetExplorer.Application")
            Ie.Visible = True
            Ie.Navigate(Ajuda)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
        
    End Sub

    Private Sub cbCidade_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles cbCidade.SelectedIndexChanged

    End Sub
End Class

